adTempus API
PreviousUpNext
IScheduler::LookupAccount Method

Looks up a security account (user or group) and returns a SecEntity object representing the entity.

C++
HRESULT LookupAccount(BSTR targetComputer, BSTR name, [out,retval] ISecEntity ** pVal);
C#
LookupAccount(String targetComputer, String name, [out,retval] ISecEntity * pVal);
Visual Basic
Sub LookupAccount(targetComputer As String, name As String, pVal As [out,retval] ISecEntity *)

LookupAccount can be used to resolve a security name entered by a user in the user interface. It returns an ISecEntity object corresponding to the user, which can be used to assign rights through a security descriptor

The method fails with error ADT_E_NOT_FOUND if the name cannot be resolved. 

If you want to list accounts for a domain, the targetComputer must contain the name of the computer that is the domain controller. This can be obtained through IScheduler.DomainController.

Security names are specified using the form "[domain]name". For example:

SomeUser mydomainSomeUser SomeUserGroup builtinAdministrators

adTempus API Reference version 3.0.0.0, revised 10/30/2008